package com.example.demo.bean;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@TableName("page_config_item")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageConfigItem {


    public enum ContentTypeEnum {
        TEXT("文字"),
        IMAGE("图片"),
        VIDEO("视频"),
        MIXED("图文");   // ← 新增

        private final String description;

        ContentTypeEnum(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }
    }


    @TableId(type = IdType.AUTO)   // 关键：AUTO 代表数据库自
    private Integer id;


    @TableField("page_config_id")
    private Integer pageConfigId;


    @TableField("content_type")
    private ContentTypeEnum contentType;


    @TableField("content")
    private String content;


    @TableField("speaker_content")
    private String speakerContent;


    @TableField("order_index")
    private Integer orderIndex;


    // 新增字段：用于存储图片/视频URL列表
    @TableField("list")
    private String list;


}
